package com.didispace.chapter44;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.io.File;

@Component
public class PathManager {

    private final String path;

    public PathManager(@Value("${file.upload.path}") String path) {
        this.path = path;
//        File file = new File(path);
//        if (!file.exists()) {
//            file.mkdirs();
//        }
    }

    public String getPath() {
        return path;
    }
}
